package com.t6;

/**
 * Created by xuyiwei on 2018/7/18.
 */
public class Range {

    public static Integer[] getInteger(int start,int end ,int step){
        int es = end - start;
        int size = 0;
        size = es/step+1;
        Integer[] iarr = new Integer[size];
        for(int i=0;i<size;i++){
            iarr[i]  = start+(i*step);
        }

        return iarr;
    }

    public static void main(String[] args) {
        Integer[] arr = Range.getInteger(1,10,2);
        for(int i:arr){
            System.out.println(i);
        }
    }

}
